package carltechnology.com.mahjonggame.utils;

import org.greenrobot.eventbus.EventBus;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Created by WZTCM on 2016/6/1.
 */
public class Utils {
    //private static Utils instance = null;
    public enum CONSTANT{
        ONBACKBUFFER_SIZE(99),
        ONBACKBUFFER_SMALL_SIZE(10);
        private int constant;
        CONSTANT(int constant){
            this.constant = constant;
        }
        public int getConstant(){
            return constant;
        }
    }
    private static EventBus eventBus = null;
    public static String getTodayDate(){
        String today =
                new SimpleDateFormat("yyyy-MM-dd").format(new Date());
        return today;
    }
    public static EventBus getEventBus(){
        if (eventBus == null){
            eventBus = new EventBus();
        }
        return eventBus;
    }

    public static boolean stringIsEmpty(String content){
        if (content == null|| content.isEmpty()){
            return true;
        }
        return false;
    }
}
